import org.openscience.cdk.layout.StructureDiagramGenerator

module Mol
  
  # This class wraps an org.openscience.cdk.Molecule and adds a few convenience
  # methods for creating Molecules directly from chemical table files and
  # recalculating the atom coordinates.
  class Molecule < org.openscience.cdk.Molecule

    extend Mol::Parser::MDLMolFileParser

    # Regenerates the atom coordinates to fit the graphics canvas optimally.
    def regenerate_coordinates!
      StructureDiagramGenerator.new(self).generate_coordinates
    end
  end
end
